package com.vegetable.modules.entity.outbound;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.vegetable.common.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 其他出库商品表
 * </p>
 *
 * @author wangruijie
 * @since 2024-04-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="SalesOtherDetail对象", description="其他出库商品表")
public class SalesOtherDetail extends BaseEntity {

    @ApiModelProperty(value = "生产者ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long producerId;

    @ApiModelProperty(value = "代销发货表id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long salesId;

    @ApiModelProperty(value = "商品ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long commodityId;

    @ApiModelProperty(value = "商品编码")
    @TableField(exist = false)
    private String commodityCode;

    @ApiModelProperty(value = "商品名称")
    private String commodityName;

    @ApiModelProperty(value = "规格ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long specsId;

    @ApiModelProperty(value = "规格名称")
    private String specsName;

    @ApiModelProperty(value = "标准")
    private BigDecimal standard;

    @ApiModelProperty(value = "实际数量")
    private Integer number;

    @ApiModelProperty(value = "实际重量")
    private BigDecimal weight;

    @ApiModelProperty(value = "成本")
    private BigDecimal cost;

    @ApiModelProperty(value = "销售价格")
    private BigDecimal salePrice;


    @ApiModelProperty(value = "扣除库存")
    @TableField(exist = false)
    private List<SalesOrderDetailStock> stocks;

}
